//
//  QDScannerTicketViewController+Swift.swift
//  QDMetroClient
//
//  Created by YueWen on 2019/3/10.
//  Copyright © 2019 YueWen. All rights reserved.
//

import Foundation


extension QDScannerTicketViewController {
    
    /// 取出单程票
    @objc func requestFetchTickets(message:[String],complete:@escaping (()->())){

        QDNetworkingManager.request(needLogin: true, url: QDCustomerHostUrl + "/onlineTicket/active", method: .POST, isArray: false, paramteres: ["orderNum": orderId,"deviceId":message.first!,"qrcodeGenDate" :message[1],"randomFact": message.last!], success: { (msg, data) in
            
            /// 完成即可
            complete()
            
        }) { (msg, errorType) in
            
            /// 失败
            self.view.showTextHUD(text: msg)
            self.scannerView.start()
        }
    }
}
